package com.example.demo.entity;

import java.util.Date;

public class Idempotent {
    private Long tenantId;

    private Date createdAt;

    private Date lastModifiedAt;

    private String paramMd5;

    public Idempotent() {
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Long tenantId;

        private Date createdAt;

        private Date lastModifiedAt;

        private String paramMd5;

        public Builder setTenantId(Long tenantId) {
            this.tenantId = tenantId;
            return this;
        }

        public Builder setCreatedAt(Date createdAt) {
            this.createdAt = createdAt;
            return this;
        }
        public Builder setLastModifiedAt(Date lastModifiedAt) {
            this.lastModifiedAt = lastModifiedAt;
            return this;
        }
        public Builder setParamMd5(String paramMd5) {
            this.paramMd5 = paramMd5;
            return this;
        }

        public Idempotent build() {
            return new Idempotent(this);
        }
    }

    public Idempotent(Builder builder) {
        this.tenantId = builder.tenantId;
        this.createdAt = builder.createdAt;
        this.lastModifiedAt = builder.lastModifiedAt;
        this.paramMd5 = builder.paramMd5;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getLastModifiedAt() {
        return lastModifiedAt;
    }

    public void setLastModifiedAt(Date lastModifiedAt) {
        this.lastModifiedAt = lastModifiedAt;
    }

    public String getParamMd5() {
        return paramMd5;
    }

    public void setParamMd5(String paramMd5) {
        this.paramMd5 = paramMd5;
    }
}
